From: Aaron Schulz Date: Fri, 13 Apr 2018 21:16:39 +0000 (-0700) Subject: Fix testGetMap_twoValues() failures for sqlite X-Git-Tag: 1.31.0-rc.0~77^2 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=3b58b6d14388fe9b534ab72f9cd0e4d0014fefdd;p=lhc%2Fweb%2Fwiklou.git Fix testGetMap_twoValues() failures for sqlite Change-Id: I3f42208d8e42ba923d4b08bb7efe15f871165899 --- diff --git a/includes/Storage/NameTableStore.php b/includes/Storage/NameTableStore.php index 465f299770..ebce3da965 100644 --- a/includes/Storage/NameTableStore.php +++ b/includes/Storage/NameTableStore.php @@ -321,7 +321,8 @@ class NameTableStore { 'name' => $this->nameField ], [], - __METHOD__ + __METHOD__, + [ 'ORDER BY' => 'id' ] ); $assocArray = []; diff --git a/tests/phpunit/includes/Storage/NameTableStoreTest.php b/tests/phpunit/includes/Storage/NameTableStoreTest.php index 5276a140f6..0cd164b76f 100644 --- a/tests/phpunit/includes/Storage/NameTableStoreTest.php +++ b/tests/phpunit/includes/Storage/NameTableStoreTest.php @@ -257,7 +257,7 @@ class NameTableStoreTest extends MediaWikiTestCase { $store->getMap(); $table = $store->getMap(); - $expected = [ 2 => 'bar', 1 => 'foo' ]; + $expected = [ 1 => 'foo', 2 => 'bar' ]; $this->assertSame( $expected, $table ); // Make sure the table returned is the same as the cached table $this->assertSame( $expected, TestingAccessWrapper::newFromObject( $store )->tableCache );